using UnityEngine;

namespace UnityActionSystem.Samples
{
    /// <summary>
    /// 简单消息事件数据
    /// </summary>
    public class TestMessageEvent : EventDataBase
    {
        /// <summary>
        /// 消息内容
        /// </summary>
        public string Message { get; }

        /// <summary>
        /// 消息类型
        /// </summary>
        public string MessageType { get; }

        public TestMessageEvent(string message, string messageType = "Info") : base()
        {
            Message = message;
            MessageType = messageType;
        }

        public TestMessageEvent(ulong sourceId, string message, string messageType = "Info") : base(sourceId)
        {
            Message = message;
            MessageType = messageType;
        }
    }

    /// <summary>
    /// 玩家事件数据
    /// </summary>
    public class TestPlayerEvent : EventDataBase
    {
        /// <summary>
        /// 玩家ID
        /// </summary>
        public ulong PlayerId { get; }

        /// <summary>
        /// 玩家位置
        /// </summary>
        public Vector3 Position { get; }

        /// <summary>
        /// 玩家状态
        /// </summary>
        public string State { get; }

        public TestPlayerEvent(ulong playerId, Vector3 position, string state) : base()
        {
            PlayerId = playerId;
            Position = position;
            State = state;
        }

        public TestPlayerEvent(ulong sourceId, ulong playerId, Vector3 position, string state) : base(sourceId)
        {
            PlayerId = playerId;
            Position = position;
            State = state;
        }
    }

    /// <summary>
    /// 游戏状态事件数据
    /// </summary>
    public class TestGameStateEvent : EventDataBase
    {
        /// <summary>
        /// 游戏状态
        /// </summary>
        public string GameState { get; }

        /// <summary>
        /// 状态值
        /// </summary>
        public int StateValue { get; }

        public TestGameStateEvent(string gameState, int stateValue) : base()
        {
            GameState = gameState;
            StateValue = stateValue;
        }

        public TestGameStateEvent(ulong sourceId, string gameState, int stateValue) : base(sourceId)
        {
            GameState = gameState;
            StateValue = stateValue;
        }
    }
}